<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org">
<head>
    <meta charset="UTF-8">
    <title>任务管理</title>
    <link rel="icon" href="favicon.ico" type="images/ico">
    <meta name="author" content="dc">
    <link rel="stylesheet" type="text/css" href="/css/materialdesignicons.min.css">
    <link rel="stylesheet" type="text/css" href="/css/bootstrap.min.css">
    <link rel="stylesheet" type="text/css" href="/css/animate.min.css">
    <link rel="stylesheet" type="text/css" href="/css/style.min.css">

    <link href="/js/bootstrap-table/bootstrap-table.min.css" rel="stylesheet" />
    <!--固定table列-->
    <link href="/js/bootstrap-table/extensions/fixed-columns/bootstrap-table-fixed-columns.min.css" rel="stylesheet"/>

    <link rel="stylesheet" href="/js/jquery-confirm/jquery-confirm.min.css" />
    <link rel="stylesheet" href="/css/input_tags.css"/>
    <!--时间选择插件-->
    <link rel="stylesheet" href="/js/bootstrap-datetimepicker/bootstrap-datetimepicker.min.css">
    <!--日期选择插件-->
    <link rel="stylesheet" href="/js/bootstrap-datepicker/bootstrap-datepicker3.min.css">
    <link rel="stylesheet" href="/js/need/verfont.css" />
    <!-- 多选下拉 -->
    <link rel="stylesheet" href="/css/bootstrap-select.css" type="text/css"/>
    <link rel="stylesheet" href="/js/need/select.2.0.css" />
    <link rel="stylesheet" href="/css/skin.css"/>
    <style>
        .text-line{
            display: inline-block;
        }
        .task-center{
            /*text-align: center;*/
            margin-top: 15px;
            padding-left:50px;
        }
    </style>
</head>
<body>
<div class="container-fluid customer-page">
    <div class="card">
        <div class="card-header">
            <h1>任务管理</h1>
        </div>
        <div class="card-body">
            <div class="row">
                <div class="form-group col-lg-5 col-md-6 col-sm-12 col-xs-12">
                    <div class="row">
                        <div class="form-group col-lg-12 col-md-12 col-sm-12 col-xs-12">

                            <div class="btn-group pull-right">
                                <button type="button" class="btn btn-info " onclick="addTaskInfo()">
                                    添加任务 </span>
                                </button>
                            </div>
                        </div>
                    </div>

                    <table  id="taskInfo"></table>
                </div>
                <div class="form-group col-lg-6 col-md-6 col-sm-12 col-xs-12" style="margin-top: 53px">
                    <table  id="taskUser"></table>
                </div>

            </div>
        </div>
    </div>
</div>

<!-- 添加div -->
<div class="modal fade" tabindex="-1" role="dialog" id="addTask" >
    <div class="modal-dialog" role="document" style="width: 80%">
        <div class="modal-content">
            <form>
                <div class="modal-body">
                    <input type="hidden" id="taskId" name="taskId">
                    <div class="row">
                        <div class="form-group col-lg-4 col-md-4 col-sm-6 col-xs-12" id="taskNamediv">
                            <label class="control-label" style="width: 120px;text-align: left;">任务名称</label>
                            <div >
                                <input type="text" class="form-control" id="taskName"  placeholder="请输入任务名称" >
                            </div>
                        </div>
                        <div class="form-group col-lg-4 col-md-4 col-sm-6 col-xs-12">
                            <label class="col-sm-1 control-label" style="width: 120px;text-align: left;">任务类型</label>
                            <div>
                                <select class="form-control" id="typeSelect" type="text" title="请选择任务类型" data-live-search="true" >
                                    <option value="">请选择任务类型</option>
                                    <option value="0">业绩</option>
                                    <option value="1">电话</option>
                                    <option value="2">联系人</option>
                                    <option value="3">会员</option>
                                </select>
                            </div>
                        </div>
                        <div class="form-group col-lg-4 col-md-4 col-sm-6 col-xs-12" id="taskTargetdiv">
                            <label class="control-label" style="width: 120px;text-align: left;">任务目标</label>
                            <div >
                                <input type="number" class="form-control" id="taskTarget" >
                            </div>
                            <p style="text-indent: 20px;line-height: 30px; display: none;color:red;font-size: 12px;" id="type0">
                                （请填写实际金额，不含汉字"万"等字样）
                            </p>
                            <p style="text-indent: 20px;line-height: 30px; display: none;color:red;font-size: 12px;" id="type1">
                                （请填写电话市场数字，以小时为单位）
                            </p>
                            <p style="text-indent: 20px;line-height: 30px; display: none;color:red;font-size: 12px;" id="type2">
                                （请填写联系人个数）
                            </p>
                            <p style="text-indent: 20px;line-height: 30px; display: none;color:red;font-size: 12px;" id="type3">
                                （请填写会员个数）
                            </p>
                        </div>


                    </div>

                </div>
                <div class="modal-footer" style="display: flex;justify-content: center;">&nbsp;&nbsp;&nbsp;
                    <button style="margin-right: 20px;" type="button" class="btn btn-primary" onclick="saveTaskInfo()">保存</button>
                    <button type="button" class="btn btn-default" data-dismiss="modal">关闭</button>
                </div>
            </form>
        </div>
    </div>
</div>
<!-- end -->

<!-- 分配div -->
<div class="modal fade" tabindex="-1" role="dialog" id="addTaskUser">
    <div class="modal-dialog" role="document" style="width: 60%">
        <div class="modal-content">
            <form>
                <div class="modal-body">
                    <input type="hidden" id="assignmentsTaskId" name="assignmentsTaskId">
                    <div class="row">
                        <div class="form-group col-lg-6 col-md-6 col-sm-6 col-xs-12">
                            <label class="control-label" for="startTime">选择任务起止日期</label>
                            <div class="form-content input-group">
                                <input type="text" id="startTime" class="form-control date-input"
                                       placeholder="请选择任务起始时间" autocomplete="off">
                                <span class="input-group-addon">至</span>
                                <input type="text" id="endTime" class="form-control date-input"
                                       placeholder="请选择任务截止时间" autocomplete="off">
                            </div>
                        </div>
                        <div class="form-group col-lg-6 col-md-6 col-sm-6 col-xs-12">
                            <label for="userSelect">所属人</label>
                            <div>
                                <select id="userSelect" name="userSelect" multiple="multiple" class="form-control selectpicker" data-live-search="true">
                                    <option value="">请选择</option>
                                </select>
                            </div>
                        </div>
                    </div>

                </div>
                <div class="modal-footer" style="display: flex;justify-content: center;">&nbsp;&nbsp;&nbsp;
                    <button style="margin-right: 20px;" type="button" class="btn btn-primary" onclick="saveAssignments()">提交</button>
                    <button type="button" class="btn btn-default" data-dismiss="modal">关闭</button>
                </div>
            </form>
        </div>
    </div>
</div>

<!-- 详情div -->
<div class="modal fade" tabindex="-1" role="dialog" id="taskUserDateil">
    <div class="modal-dialog" role="document">
        <div class="modal-content">
            <div class="row">
                <div class="col-lg-6 col-md-6 col-sm-6 col-xs-12 task-center" id="taskNameDateilDiv">
                    <label   style="width: 80px;text-align: left;">任务名称:</label>
                    <div  class="text-line">
                        <span id="taskNameDateil"></span>
<!--                        <input type="text"  class="form-control" style="width: 100px" readonly>-->
                    </div>
                </div>
                <div class="col-lg-6 col-md-6 col-sm-6 col-xs-12 task-center" id="taskTypeDateilDiv">
                    <label   style="width: 80px;text-align: left;">任务类型:</label>
                    <div  class="text-line">
                        <span id="taskTypeDateil"></span>
<!--                        <input type="text"  class="form-control" style="width: 100px" readonly>-->
                    </div>
                </div>
                <div class="col-lg-6 col-md-6 col-sm-6 col-xs-12 task-center" id="taskTargetDateilDiv">
                    <label   style="width: 80px;text-align: left;">任务目标:</label>
                    <div  class="text-line">
                        <span id="taskTargetDateil"></span>
<!--                        <input type="text"  class="form-control" style="width: 100px" readonly>-->
                    </div>
                </div>

            </div>
            <hr/>
            <div class="row ">
                <div class="col-lg-12 col-md-12 col-sm-12 col-xs-12 task-center" id="taskUsersDiv">
                    <label  style="width: 120px;text-align: left;margin-bottom: 10px;">任务所有人</label>
                    <table id="taskUsers"></table>
                </div>
            </div>

        </div>
    </div>
</div>
<!-- end -->
</body>


<script type="text/javascript" src="/js/jquery.min.js"></script>
<script type="text/javascript" src="/js/bootstrap.min.js"></script>
<script type="text/javascript" src="/js/perfect-scrollbar.min.js"></script>
<script type="text/javascript" src="/js/main.min.js"></script>
<script type="text/javascript" src="/js/bootstrap-table/bootstrap-table.min.js"></script>
<script type="text/javascript" src="/js/bootstrap-table/bootstrap-table-zh-CN.min.js"></script>
<script type="text/javascript" src="/js/popper.min.js"></script>
<script type="text/javascript" src="/js/jquery.cookie.min.js"></script>
<script src="/js/crm/common/input-tag.js"></script>
<!--table固定列-->
<script type="text/javascript" src="/js/bootstrap-table/extensions/fixed-columns/bootstrap-table-fixed-columns.js"></script>
<!-- 拖动 -->
<script src="/js/bootstrap-table/extensions/resizable/bootstrap-table-resizable.min.js"></script>
<script src="/js/crm/common/colResizable-1.6.min.js"></script>

<!--时间选择插件-->
<script src="/js/bootstrap-datetimepicker/moment.min.js"></script>
<script src="/js/jquery-confirm/jquery-confirm.min.js"></script>
<script src="/js/bootstrap-datetimepicker/bootstrap-datetimepicker.min.js"></script>
<script src="/js/bootstrap-datetimepicker/locale/zh-cn.js"></script>
<!--日期选择插件-->
<script src="/js/bootstrap-datepicker/bootstrap-datepicker.min.js"></script>
<script src="/js/bootstrap-datepicker/locales/bootstrap-datepicker.zh-CN.min.js"></script>
<script type="text/javascript" src="/js/crm/common/dataRangePicker.min.js"></script>
<script src="/js/verSelect.2.0.js"></script>
<!-- 多选框下拉 -->
<script type="text/javascript" src="/js/bootstrap-multiselect.js"></script>
<script type="text/javascript" src="/js/bootstrap-select.js"></script>
<script type="text/javascript" src="/js/bootstrap.lyear.dropdowntree.min.js"></script>
<!-- -&#45;&#45;-->
<!--标签插件-->
<script src="/js/jquery-tags-input/jquery.tagsinput.min.js"></script>
<!--时间选择插件-->

<!-- 图表 -->
<script type="text/javascript" src="/js/echarts.min.js"></script>
<!-- 多选框下拉 -->
<script src="/js/verSelect.2.0.js"></script>
<script src="/js/crm/taskManager/taskInfo.js"></script>
</html>